//
#import "BKStringConstant.h"

@implementation BKStringConstant

- (id) initWithXMLElement: (NSXMLElement*) elem signatures: (BKSignatures*) sigs
{
	if(self = [super initWithXMLElement: elem signatures: sigs])
	{
		NSXMLNode* theNode = [elem attributeForName: @"value"];
		self.value = [theNode stringValue];
		
		if(theNode = [elem attributeForName: @"nsstring"])
		{
			if([[theNode stringValue] isEqual: @"true"])
				_nsstring = YES;
		}
	}
	return self;
}

- (void) dealloc
{
	[_value release];
	[super dealloc];
}

@synthesize value = _value;
@synthesize nsstring = _nsstring;

- (NSString*) description
{
	return [NSString stringWithFormat: @"<%@: %p, name=%@, value=%@>",
		NSStringFromClass([self class]), self, _name, _value];
}

@end
